package com.hwl.demo20.service.impl;

import com.hwl.demo20.service.Country;
import com.hwl.demo20.service.UnitedNations;

/**
 * 联合国安理会
 *
 * @author sentry
 * @since 2023-03-26
 */
public class UnitedNationsSecurityCouncil extends UnitedNations {

    private Country countryUSA;
    private Country countryIraq;

    public void setCountryUSA(Country countryUSA) {
        this.countryUSA = countryUSA;
    }

    public void setCountryIraq(Country countryIraq) {
        this.countryIraq = countryIraq;
    }

    @Override
    public void declare(String message, Country country) {
        if (country == this.countryUSA) {
            this.countryIraq.getMessage(message);
        } else if (country == this.countryIraq) {
            this.countryUSA.getMessage(message);
        }
    }
}
